<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        table{
            margin: auto auto;
        }
        td{
            width: 100px;
            border: 1px solid blue;
            text-align: center;
        }
        td:hover{
            color:yellow;
            font-weight: bold;
            background-color: blue;
        }
    </style>
</head>
<body>
    <script type="text/javascript">  
           
         document.write("<table>");     
         for (var x = 1; x <= 9; x++)  
         {  
             document.write("<tr>");     
             for (var y = 1; y <= x; y++)
             {  
                 document.write("<td>"+y+"x"+x+"="+y*x+"</td>");
             }                                                    
            document.write("</tr>");  
         }  
        document.write("</table>");    
    </script> 
</body>
</html>
